<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<%-- <input type="hidden" name="zh_parsen/fzr_name"
	value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name"/>" />
<input type="hidden" name="zh_parsen/fzr_mobile"
	value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile"/>" />
<input type="hidden" name="zh_parsen/fzr_tel"
	value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work"/>" />
<input type="hidden" name="zh_parsen/fzr_email"
	value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email"/>" /> --%>
<div class="t_bar">
	<span class="color_red">*</span>项目基本情况
</div>
<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1" id="pro_info">
	<col style="width: 16%" />
	<col style="width: 34%" />
	<col style="width: 16%" />
	<col style="width: 34%" />
	

	<tr class="li_1">
		<td align="right">项目名称：</td>
		<td colspan="3"><input type='text' name='proposal/zh_title'
			id='zh_title' style="width: 78.1%"
			class="input_css required maxlength:100" maxlength="100"
			value='<x:out select="$xmlData/data/proposal/zh_title"/>'
			label="项目名称"></td>
			
	</tr>

	<tr>
		<td align="right">项目开始时间：</td>
        <td colspan="1"><span name="proposal/start_date" >${param.pro_start_date}</span></td>
		<td align="right">项目结束时间：</td>
        <td><span name="proposal/end_date" >${param.pro_end_date}</span></td>
	</tr>

	<tr>
		<td align="right">依托单位联系人姓名：</td>
		<td colspan="1"><input type="text" label="依托单位联系人姓名"
			name="proposal/contact_psn_cname" class="input_css required"
			maxlength="50"
			value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />">
		</td>
		<td align="right">依托单位联系人手机：</td>
		<td><input type="text" label="依托单位联系人手机"
			name="proposal/contact_psn_mobile" class="required mobile"
			onfocus="InitInput.setNumber(this,11,0,0);"
			value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />" />
		</td>
	</tr>

	<%-- <tr>

		<td align="right">联系人电话：</td>
		<td colspan="1"><input type="text" label="联系人电话"
			name="proposal/contact_psn_tel" class="required phone" maxlength="20"
			value="<x:out select="$xmlData/data/proposal/contact_psn_tel" />" />
		</td>
		<td align="right">电子邮箱：</td>
		<td><input name="proposal/contact_psn_mail" label="联系人电子邮箱"
			type="text" required class="input_css required email " maxlength="50"
			value="<x:out select="$xmlData/data/proposal/contact_psn_mail" />" /></td>
	</tr> --%>

	<tr>
		<td align="right" nowrap>学科名称：</td>
		<td colspan="1">
				<c:set var="subject">{'id':'<x:out select="$xmlData/data/proposal/subject_value" />','name':'<x:out select="$xmlData/data/proposal/subject_name" />'}</c:set>
				<cpt:tree key="subject2" cacheable="false" value="${subject }"  label="学科名称"
         			id="subject"  showPattern="all" shieldPattern="0" topCheckbox="false" onClick="initTreeValueExt2" />
				<input type="hidden" id="subject_value" name="proposal/subject_value"  class="required"  value="<x:out select="$xmlData/data/proposal/subject_value" />" label="学科名称">
				<input type="hidden" id="subject_name" name="proposal/subject_name" value="<x:out select="$xmlData/data/proposal/subject_name" />">
		</td>
		<td align="right">项目报审级次：（省补助资金拨付所属财政局）
		</td>
		<td><c:set var="sub_step">{'id':'<x:out
					select="$xmlData/data/proposal/sub_step_value" />','name':'<x:out
					select="$xmlData/data/proposal/sub_step_name" />'}</c:set> <cpt:tree
				key="sub_step" cacheable="false" className="hn_iuput_kuang  "
				readonly="true" value="${sub_step}" label="项目报审级次" id="sub_step"
				onlyChooseLeaf="false" showPattern="all" shieldPattern="0"
				topCheckbox="true" onClick="initTreeValueExt" /> <input
			id="sub_step_value" type="hidden" name="proposal/sub_step_value"
			class="required" label="项目报审级次"
			value="<x:out select="$xmlData/data/proposal/sub_step_value" />" />
			<input id="sub_step_name" type="hidden" name="proposal/sub_step_name"
			value="<x:out select="$xmlData/data/proposal/sub_step_name" />" /></td>
	</tr>

	<tr>
		<td align="right">项目申请金额（万元）：</td>
		<td colspan="1">
			<span id="request_money"  name="proposal/request_money"><x:out select="$xmlData/data/proposal/request_money" /></span>
		</td>
		<td align="right" >申报日期：</td>
		<td colspan="1"> <c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
			<cpt:date id="apply_date_curr"  name="proposal/submit_date" value="${submit_date}" className="required date" label="申报日期" ></cpt:date> 
		</td>
		
	</tr>
	
	<tr>
		<td align="right">单位配套金额（万元）：</td>
		<td colspan="3"><input type='text' name='proposal/danwei_money'
			class="required" id='danwei_money'
			onfocus="InitInput.setNumber(this,9,4,2)" style="text-align: right;"
			value='<x:out select="$xmlData/data/proposal/danwei_money"/>'
			label="单位配套金额"></td>	
	</tr>
	
	<tr>
		<td align="right">关键词： <br>
			（用分号分开，最多5个）</td>
		<td nowrap colspan="3"><input id="keyword"
			name="proposal/keyword" label="关键词" type="text" required
			class="input_css required" style="width: 78.1%;" maxlength="100"
			value="<x:out select="$xmlData/data/proposal/keyword" />" /></td>
	</tr>
	
	<tr>
		<td align="right">项目简介（限280字）：</td>
		<td colspan="3">
	    		<textarea name="proposal/project_description" style="width:98%" class="input_textarea required maxlength:280"  label="项目简介"   rows=10 cols=60><x:out select="$xmlData/data/proposal/project_description" /></textarea>
				<input type="hidden" name="proposal/project_description_hidden" id="project/project_description_hidden" value="<x:out select="$xmlData/data/proposal/project_description_hidden" />"/>
		</td>
	</tr>
</table>
<div class="t_bar">
		项目负责人信息
	</div>
<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1" id="pro_info2">
	<col style="width: 16%" />
	<col style="width: 17%" />
	<col style="width: 17%" />
	<col style="width: 16%" />
	<col style="width: 18%" />
	<col style="width: 16%" />
	<tr>
	
		<td align="right">姓名：</td>
		<td colspan="2"><span name="proposal/zh_person/fzr_name"> <x:out
					select="$xmlData/data/zh_persons/zh_person/basic_info/zh_name" />
		</span></td>
		<td align="right">性别：</td>
		<td colspan="2"><c:set var="gender_value">
				<x:out
					select="$xmlData/data/zh_persons/zh_person/basic_info/gender_value" />
			</c:set> <c:if test="${gender_value=='M' }">
				<c:set var="gender_name">男</c:set>
			</c:if> <c:if test="${gender_value=='F' }">
				<c:set var="gender_name">女</c:set>
			</c:if> <c:if test="${empty gender_value}">
				<c:set var="gender_name"></c:set>
			</c:if> <span name="proposal/basic_info/gender_name">${gender_name }</span>
		</td>
	</tr>


	<tr>
		<td align="right">出生年月：</td>
		<td  colspan="2">
					<%-- <span name="proposal/zh_person/birthday" style="display: none;"> 
							<x:out select="$xmlData/data/zh_persons/zh_person/basic_info/birthday" />
					</span> --%>
					<span id = "fzbirthday" style="display: none;"><x:out select="$xmlData/data/zh_persons/zh_person/basic_info/birthday" /></span>
					<c:set var="birthday">
                        <x:out select="$xmlData/data/zh_persons/zh_person/basic_info/birthday" />
                   </c:set>
                   <c:set var="temp">${fn:substring(birthday,0,10) }</c:set>
                   
                   <span name="proposal/zh_person/birthday" >${fn:split(temp,'-')[0]}-${fn:split(temp,'-')[1]}  </span>
		</td>
		<td align="right">民族：</td>
		<td colspan="2"><span name="proposal/zh_person/ethnicity_name"> <x:out
					select="$xmlData/data/zh_persons/zh_person/basic_info/ethnicity_name" />
		</span></td>
	</tr>

	<tr>
		<td align="right">最高学位：</td>
		<td  colspan="2"><span name="proposal/zh_person/degree_name"><x:out
					select="$xmlData/data/zh_persons/zh_person/basic_info/degree_name" />
		</span></td>
		<td align="right">职称：</td>
		<td colspan="2">
			 <span name="proposal/prof_title_name" id ="prof_title"></span>
			 <input type="hidden" id="prof_title_name" value="<x:out select="$xmlData/data/zh_persons/zh_person/basic_info/prof_title_name" />" />
		<%-- <c:set var="prof_title">
				{'id':'<x:out
					select="$xmlData/data/zh_persons/zh_person/basic_info/prof_title_value" />',
				'name':'<x:out
					select="$xmlData/data/zh_persons/zh_person/basic_info/prof_title_name" />'}					
			</c:set> <cpt:tree key="prof_title" cacheable="false" value="${prof_title }"
				id="contact_prof_title" name="contact_prof_title" readonly="true"
				onClick="initTreeValueExt" /> <input type="hidden"
			id="prof_title_value" name="proposal/prof_title_value"
			value="<x:out select="$xmlData/data/proposal/prof_title_value" />"
			class="required" label="职称" /> <input type="hidden"
			id="prof_title_name" name="proposal/prof_title_name"
			value="<x:out select="$xmlData/data/proposal/prof_title_name"/>" /> --%>
		</td>
	</tr>

	<tr>
		<td align="right">职务：</td>
		
		<td colspan="2">
		<x:out select="$xmlData/data/zh_persons/zh_person/basic_info/position" />
		<%-- <input name="proposal/contact_position"
			value="<x:out select="$xmlData/data/proposal/contact_position"/>"
			class="required maxlength:50" label="职务" /></td> --%>
		<td align="right">电话：</td>
		<td colspan="2"><span name="proposal/contact/mobile"> <x:out
					select="$xmlData/data/zh_persons/zh_person/contact/mobile" />
		</span></td>
	</tr>

	<tr>
		<td align="right"><span class="color_red">*</span>每年工作时间（月）：</td>
		<td colspan="2"><input type="text" label="每年工作时间（月）"
			name="proposal/work_months" id="work_months"
			class="input_text required valueLENum:work_months:12 valueGNum:work_months:0" 
			style="text-align: right;" onfocus="InitInput.setNumber(this,2,1,1);"
			value="<x:out select="$xmlData/data/proposal/work_months" />" /></td>
		<td align="right">传真：</td>
		<td colspan="2"><span name="proposal/contact/fax"> <x:out
					select="$xmlData/data/zh_persons/zh_person/contact/fax" />
		</span></td>
	</tr>

	<tr>
	<!-- ah_city -->
		<td align="right">所在地区：</td>
		<td colspan="2"><c:set var="ah_ceshi">
				<x:out select="$xmlData/data/proposal/ah_ceshi_value" />
			</c:set> <cpt:select id="ah_ceshi" style="width:177px;" key="ah_ceshi"
				value="${ah_ceshi}" onChange="initControlValue(this.id);"></cpt:select>
			<input type="hidden" id="ah_ceshi_value"
			name="proposal/ah_ceshi_value" class="required"
			value="${ah_ceshi}" label="所在地区"> <input
			type="hidden" name="proposal/ah_ceshi_name"
			value="<x:out select="$xmlData/data/proposal/ah_ceshi_name" />">
		</td>
		<td align="right">电子邮箱：</td>
		<td colspan="2"><span name="proposal/contact/email"> <x:out
					select="$xmlData/data/zh_persons/zh_person/contact/email" />
		</span></td>
	</tr>

	<tr>
		<td align="right"><span class="color_red">*</span>个人通讯地址：</td>
		<td colspan="2"><input
			name="proposal/basic_info/communication_address" maxlength="50"
			class="required" label="个人通讯地址" style="width:71%"
			value="<x:out select="$xmlData/data/proposal/basic_info/communication_address" />" />
		</td>
		<td align="right">联系电话：</td>
		<td colspan="2">
			<span name="proposal/contact/tel_work"> <x:out
					select="$xmlData/data/zh_persons/zh_person/contact/tel_work" />
			</span>
		</td>
	</tr>

	<tr>
		<td align="right">工作单位：</td>
		<td colspan="5"><span name="proposal/basic_info/org_name">
				<x:out
					select="$xmlData/data/zh_persons/zh_person/basic_info/org_name" />
		</span></td>
	</tr>

	<tr>
		<td align="right"><span class="color_red">*</span>主要研究领域：</td>
		<td  colspan="2"><input name="proposal/basic_info/major_direction"
			maxlength="50" class="required" label="主要研究领域" style="width:71%"
			value="<x:out select="$xmlData/data/proposal/basic_info/major_direction" />" />
		</td>
		<td align="right">现从事专业：</td>
		<td  colspan="2"><span name="proposal/contact/major_work"> <x:out
					select="$xmlData/data/zh_persons/zh_person/contact/major_work" />
		</span></td>
	</tr>

	<%-- <tr>
		<td align="right">职称：</td>
		<td>
			<c:set var="json_contact_prof_title_value">
				{'id':'<x:out select="$xmlData/data/proposal/contact_prof_title_value" />',
				'name':'<x:out select="$xmlData/data/proposal/contact_prof_title_name" />'
				}					
			</c:set>

			<cpt:tree key="prof_title" cacheable="false" value="${json_contact_prof_title_value }"
				id="contact_prof_title" name="contact_prof_title" readonly="true"
			 	onClick="initTreeValueExt" />
			 	
			<input type="hidden" id="contact_prof_title_value"
				name="proposal/contact_prof_title_value"
				value="<x:out select="$xmlData/data/proposal/contact_prof_title_value" />" class="required" label="职称" />
			<input type="hidden" id="contact_prof_title_name"
				name="proposal/contact_prof_title_name"
				value="<x:out select="$xmlData/data/proposal/contact_prof_title_name"/>" />
		</td>
		<td align="right">职务：</td>
		<td>
			<input name="proposal/contact_position"
				value="<x:out select="$xmlData/data/proposal/contact_position"/>"
				class="required maxlength:50" label="职务" />
		</td>
	</tr> --%>
	
	
	
	<tr>
		<td ></td>
		<td align="center">授予院校</td>
		<td align="center">国别</td>
		<td align="center">所学专业</td>
		<td align="center">授予时间</td>
		<td align="center">导师姓名</td>
	</tr>
	
	<tr>
		<td align="right">硕士学位：</td>
		<td align="center">
			<input style="width:75%" name="proposal/learn/college_master" class="input_text " label="硕士学位-->院校" value="<x:out select="$xmlData/data/proposal/learn/college_master"/>"  maxlength="100"/>
		</td>
		<td align="center">
			<c:set var="mater_country">
				<x:out select="$xmlData/data/proposal/mater_country_value" />
			</c:set> <cpt:select id="mater_country"  key="country" style="width:75%"
				value="${mater_country}" onChange="initControlValue(this.id);"></cpt:select>
			<input type="hidden" id="mater_country_value"
			name="proposal/mater_country_value" 
			value="${mater_country}" label="硕士学位-->国别"> <input
			type="hidden" name="proposal/mater_country_name"
			value="<x:out select="$xmlData/data/proposal/mater_country_name" />">
		</td>
		<td align="center">
			<input type='text' name='proposal/major_master' lable="硕士-->所学专业"
			class="input_css  maxlength:100" maxlength="100" style="width:75%"
			value='<x:out select="$xmlData/data/proposal/major_master"/>'
		</td>
		<td style="text-align: center;">
		    <c:set var="awarded_date"><x:out select="$xmlData/data/proposal/reward/awarded_master" /></c:set> 
			<cpt:date id="awarded_date" size="8" name="proposal/reward/awarded_master" value="${awarded_date}"  className=" date" label="硕士学位-->授予时间" ></cpt:date>
	    </td>

		<td align="center">
			<input type="text" label="硕士学位-->导师姓名"
			name="proposal/teachername_master" class="input_css "
			maxlength="100" style="width:75%"
			value="<x:out select="$xmlData/data/proposal/teachername_master" />">
		</td>
	</tr> 
	
	<tr>
		<td align="right">博士学位：</td>
		<td align="center">
			<input style="width:75%" name="proposal/learn/college_doctor" class="input_text " label="博士学位-->院校" value="<x:out select="$xmlData/data/proposal/learn/college_doctor"/>"  maxlength="100"/>
		</td>
		<td align="center">
			<c:set var="doctor_country">
				<x:out select="$xmlData/data/proposal/doctor_country_value" />
			</c:set> <cpt:select id="doctor_country"  key="country" style="width:75%"
				value="${doctor_country}" onChange="initControlValue(this.id);"></cpt:select>
			<input type="hidden" id="doctor_country_value" 
			name="proposal/doctor_country_value"  
			value="${doctor_country}" label="博士学位-->国别"> <input
			type="hidden" name="proposal/doctor_country_name"
			value="<x:out select="$xmlData/data/proposal/doctor_country_name" />">
		</td>
		 <td align="center">
			<input type='text' name='proposal/major_doctor' lable="博士学位-->所学专业"
			class="input_css  maxlength:100" maxlength="100" style="width:75%"
			value='<x:out select="$xmlData/data/proposal/major_doctor"/>'
		</td>
		<td style="text-align: center;">
		    <c:set var="awarded_date2"><x:out select="$xmlData/data/proposal/reward/awarded_doctor" /></c:set> 
			<cpt:date id="awarded_date2" size="8" name="proposal/reward/awarded_doctor" value="${awarded_date2}"  className=" date" label="博士学位-->授予时间"></cpt:date>
	    </td>

		<td align="center">
			<input type="text" label="博士学位-->导师姓名"
			name="proposal/teachername_doctor" class="input_css "
			maxlength="100" style="width:75%"
			value="<x:out select="$xmlData/data/proposal/teachername_doctor" />">
		</td> 
	</tr>
	
	<tr>
		<td align="right"><span class="color_red">*</span>申请人所符合申报条件（限500字）：</td>
		<td colspan="5">
	    		<textarea name="proposal/conditions_declaration" placeholder="例如： 1、作为项目主持人承担过XXX项国家自然科学基金  2、作为第一作者被SCI等国际四大检索机构收录XXX篇论文 3、作为第XXX完成人获得国家科学技术奖XXX等奖" style="width:98%" class="input_textarea required maxlength:500"  label="申请人所符合申报条件"  
   				  rows=10 cols=60><x:out select="$xmlData/data/proposal/conditions_declaration" /></textarea>
				<input type="hidden" name="proposal/conditions_declaration_hidden" id="project/conditions_declaration_hidden" value="<x:out select="$xmlData/data/proposal/conditions_declaration_hidden" />"/>
		</td>
	</tr>
	
	 <%-- <tr>
		<td align="right" rowspan="3" ><span class="color_red">*</span>拟开展的研究：</td>
		<td align="right">
			项目名称：
		</td>
		<td colspan="4">
			<input type='text' name='proposal/zh_title_new'
			id='zh_title_new' style="width: 58%"
			class="input_css required maxlength:100" maxlength="100"
			value='<x:out select="$xmlData/data/proposal/zh_title_new"/>'
			label="拟开展的研究-->项目名称">
		</td>
	</tr>
	
	 <tr>
		<td align="right">
			项目研究所属主要学科：
		</td>
		<td colspan="4" >
				<c:set var="subject">{'id':'<x:out select="$xmlData/data/proposal/subject_value1" />','name':'<x:out select="$xmlData/data/proposal/subject_name1" />'}</c:set>
				<cpt:tree key="subject" cacheable="false" value="${subject }"  label="拟开展的研究--->项目研究所属主要学科"
         			id="subject"  showPattern="all" shieldPattern="0" topCheckbox="false" onClick="initTreeValueExt2" />
				<input type="hidden" id="subject_value" name="proposal/subject_value1"  class="required"  value="<x:out select="$xmlData/data/proposal/subject_value1" />" label="拟开展的研究--->项目研究所属主要学科">
				<input type="hidden" id="subject_name" name="proposal/subject_name1" value="<x:out select="$xmlData/data/proposal/subject_name1" />">
		</td>
	</tr>
	
	<tr>
		<td align="right">
			研究开始时间：
		</td>
		<td colspan="1">
			 <c:set var="research_start_date"><x:out select="$xmlData/data/proposal/research/research_start_date" /></c:set> 
			<cpt:date id="research_start_date" size="8" name="proposal/research/research_start_date" value="${research_start_date }"  className="date required dateCompareBeforeE:research_start_date:research_end_date" label="拟开展的研究-->研究开始时间"></cpt:date>
		</td>
		<td colspan="1" align="right">
			研究结束时间：
		</td>
		<td colspan="2">
			 <c:set var="research_end_date"><x:out select="$xmlData/data/proposal/research/research_end_date" /></c:set> 
			<cpt:date id="research_end_date" size="8" name="proposal/research/research_end_date" value="${research_end_date }"  className=" date required" label="拟开展的研究-->研究结束时间"></cpt:date>
		</td>
	</tr>  --%>
</table>

<script type="text/javascript">
	$(function() {
		showAllDateTag("pro_info");
		addlevel();
		InitMoney();
		/* 临时办法去除所属学科的属性以及加上要的*/
		/* $("#subject").removeClass();
		$("#subject").removeAttr("disabled");
		$("#subject").attr("readonly","readonly"); */
	});

	function InitMoney(){
		var grant_code= $("#grantCode").val();
		var total_each_0 = $("#request_money").html();

		if(grant_code == 4759){
			if(total_each_0 == 0){
				$("#request_money").html("0.00");
			}
		}
		/* if(grant_code == 4757){
            if(total_each_0 == 0){
                $("#total_each_0").val(parseFloat(10.00).toFixed(2));
                $("#total_fund_18").val(parseFloat(10.00).toFixed(2));
                $("#total_investfrom_5").val(parseFloat(10.00).toFixed(2));
            }
        } */
	}
	/* 用来显示等级-职称 */
	function addlevel(){
		var level = $("#level_no").val();
		var prof_title_name = $("#prof_title_name").val();
		var string1 = "未取得";
		var string2 = "高级-";
		var string3 = "副高级-";
		var string4 = "中级-";
		var string5 = "初级-";
		if(level.length<=0 || level ==""){
			$("#prof_title").html(string1);
		}else if(level==1){
			$("#prof_title").html(string2+prof_title_name);
		}else if(level==2){
			$("#prof_title").html(string3+prof_title_name);
		}else if(level==3){
			$("#prof_title").html(string4+prof_title_name);
		}else if(level==4){
			$("#prof_title").html(string5+prof_title_name);
		}
	}
	function initTreeValueExt(treeId, treeNode) {
		if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
			scmWarn($("#" + treeId).attr("label")
					+ messageTip.researchAreaInvalidDisciplineCode);
			if (treeNode.level == 0) {
				$("#" + treeId).val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_code'],[id$='" + treeId
								+ "_code']").val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_value'],[id$='" + treeId
								+ "_value']").val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_name'],[id$='" + treeId
								+ "_name']").val("");
			}

			return false;
		}

		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			obj = obj.parentNode;
		}

		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_code'],[id$='" + treeId + "_code']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_value'],[id$='" + treeId + "_value']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_name'],[id$='" + treeId + "_name']")
				.val(str);

	}
	
	function initTreeValueExt2(treeId, treeNode) {
		if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
			scmWarn($("#" + treeId).attr("label")
					+ messageTip.researchAreaInvalidDisciplineCode);
			if (treeNode.level == 0) {
				$("#" + treeId).val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_code'],[id$='" + treeId
								+ "_code']").val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_value'],[id$='" + treeId
								+ "_value']").val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_name'],[id$='" + treeId
								+ "_name']").val("");
			}

			return false;
		}

		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			obj = obj.parentNode;
		}

		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_code'],[id$='" + treeId + "_code']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_value'],[id$='" + treeId + "_value']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_name'],[id$='" + treeId + "_name']")
				.val(str);

	}


</script>
